package cn.all;

import java.util.Scanner;

public class Student {

	//学号
	private String stuNo;
	//姓名
	private String stuName;
	//语文成绩
	private  int chineseScore;
	//数学成绩
	private int mathScore;
	//英语成绩
	private int englishScore;
	//平均成绩
	private double avgScore;
	
	
	//计算平均成绩
	public double calAvgScore() {
		avgScore =( chineseScore+mathScore+englishScore)/3;
		return avgScore;
	}
	
	//打印成绩
	public  void printMes() {
		System.out.println("姓名"+stuName+"学号"+stuNo+"语文"+chineseScore+"数学"+mathScore+"英语"+englishScore+"平均成绩"+avgScore);
	}
	
	//构造方法
	
	
	public Student() {
		//调父类方法
		super();
		//输入各种数据
		Scanner sc = new Scanner(System.in);
		//提示输入
		System.out.println("请输入学生姓名：");
		stuName = sc.next();
		System.out.println("请输入学生学号：");
		stuNo = sc.next();
		System.out.println("请输入语文成绩：");
		chineseScore = sc.nextInt();
		System.out.println("请输入数学成绩：");
		mathScore = sc.nextInt();
		System.out.println("请输入英语成绩：");
		englishScore = sc.nextInt();
		
		
	}
	
	//get&set
	public String getStuNo() {
		return stuNo;
	}
	
	public void setStuNo(String stuNo) {
		this.stuNo = stuNo;
	}
	public String getStuName() {
		return stuName;
	}
	public void setStuName(String stuName) {
		this.stuName = stuName;
	}
	public int getChineseScore() {
		return chineseScore;
	}
	public void setChineseScore(int chineseScore) {
		this.chineseScore = chineseScore;
	}
	public int getMathScore() {
		return mathScore;
	}
	public void setMathScore(int mathScore) {
		this.mathScore = mathScore;
	}
	public int getEnglishScore() {
		return englishScore;
	}
	public void setEnglishScore(int englishScore) {
		this.englishScore = englishScore;
	}
	
}
